<%--
Created by IntelliJ IDEA.
User: Hasee
Date: 2018/11/6
Time: 9:25
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>导航栏</title>
    <meta name="description" content="Source code generated using layoutit.com">
    <meta name="author" content="LayoutIt!">
    <link href="bootstrap/css/bootstrap.min.css" rel="stylesheet">

</head>
<body>

<div class="container">
    <div class="row clearfix">
        <div class="col-md-12 column">
            <nav class="navbar navbar-default navbar-fixed-top" role="navigation">
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"> <span class="sr-only">Toggle navigation</span><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></button> <a class="navbar-brand" href="#"><font face="华文行楷" size="7">Traveller</font></a>
                </div>

                <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                    <ul class="nav navbar-nav">
                        <li >
                            <a href="index.jsp">首页</a>
                        </li>
                        <li>
                            <a href="raiders.jsp">旅游攻略</a>
                        </li>
                        <li class="dropdown">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown">社区<strong class="caret"></strong></a>
                            <ul class="dropdown-menu">
                                <li>
                                    <a href="photoWall.jsp">照片墙</a>
                                </li>
                                <li>
                                    <a href="qa1.jsp">问答</a>
                                </li>
                                <li>
                                    <a href="travellerTeam.jsp">旅游团</a>
                                </li>
                            </ul>
                        </li>
                    </ul>
                    <ul class="nav navbar-nav navbar-right">
                        <%
                            if (session.getAttribute("users")!=null){
                                System.out.println("***用户已经登录");
                        %>
                        <li><a href="personalHomepage.jsp"><%=request.getSession().getAttribute("name") %></a>
                        </li>
                        <%
                            }else {
                        %>
                        <li>
                            <a href="login.jsp">登录</a>
                        </li>
                        <li>
                            <a href="register.jsp">注册</a>
                        </li>
                        <%
                            }
                        %>
                    </ul>
                </div>
            </nav>
        </div>
    </div>
</div>
<script src="jquery/jquery-1.11.1.min.js"></script>
<script src="bootstrap/js/bootstrap.min.js"></script>
<script src="bootstrap/js/scripts.js"></script>
<script src="bootstrap/js/npm.js"></script>
</body>
</html>